#pragma once
#include"EventLoop.h"
#include"Buffer.h"
#include"Channel.h"
#include"HttpRequest.h"
#include"HttpResponse.h"
#include"Log.h"
#define MSG_SEND_AUTO
struct TcpConnection
{
    struct EventLoop* evloop;
    struct Channel* channel; // 变相理解成fd
    struct Buffer* inbuffer;
    struct Buffer* outbuffer;
    char name[32];
    // http协议
    struct HttpRequest* httprequest;
    struct HttpResponse* httpResponse;
};

struct TcpConnection* TcpConnectionInit(int fd , struct EventLoop* evloop);

int tcpConnectionDestory(void * arg);